<div class="card-header  text-white" xmlns="http://www.w3.org/1999/html">
    <div class="input-group col-md-12 col-xl-6">
        <input type="text" class="form-control" id="searchName" placeholder="输入耗材名称">
        <select name="state" id="erState" class="form-control">
            <option selected  value="">--请选择状态--</option>
            <option value="0">待审核</option>
            <option value="1">已通过</option>
            <option value="2">已拒绝</option>
            <option value="3">已完成</option>
        </select>
        <span class="input-group-btn">
			<button class="btn btn-secondary" type="button" id="searchNameBtn" >
				<i class="fa fa-search" aria-hidden="true"></i>
			</button>
		</span>

    </div>
</div>

<div id="mainContainer" class="container" >
    <div id="mainContainerRepleace" class="row">
        <table class="table table-striped">
            <thead>
            <tr>
                <th data-field="repairsId" >ID</th>
                <th data-field="equipmentName">器材名称</th>
                <th data-field="equipmentSpecifications">器材规格</th>
                <th data-field="equipmentCount">数量</th>
                <th data-field="equipmentPrice">价格</th>
                <th data-field="totalPrice">报修价格</th>
                <th data-field="applicant">申请人</th>
                <th data-field="repairsState">审核状态</th>
                <th data-field="operation" class="text-center">操作</th>
            </tr>
            </thead>
            <tbody>
            <tr th:each="er : ${equipmentRepairs}">
                <th th:text="${er.repairId}">...</th>
                <td th:text="${er.equipmentInfo.equipmentName}">...</td>
                <td th:text="${er.equipmentInfo.equipmentSpecifications}">...</td>
                <td th:text="${er.repairCount}">...</td>
                <td th:text="${er.equipmentInfo.equipmentPrice}">...</td>
                <td th:text="${er.repairPrice}">...</td>
                <td th:text="${er.applyTeacher.teacherName}">...</td>
                <td>
                    <span class="text-secondary" th:if="${er.repairState=='0'}">待审核</span>
                    <span class="text-success" th:if="${er.repairState=='1'}">已通过</span>
                    <span class="text-danger" th:if="${er.repairState=='2'}">已拒绝</span>
                    <span class="text-primary" th:if="${er.repairState=='3'}">已完成</span>
                </td>
                <td class="text-center">
                    <div th:if="${er.repairState=='0'}">
                        <button  class="btn btn-success btn-sm" id="audit-equipmentRepair"  data-th-attr="repairId=${er.repairId},state=1">通过</button>
                        <button  class="btn btn-danger btn-sm" id="audit-equipmentRepair"  data-th-attr="repairId=${er.repairId},state=1">拒绝</button>
                    </div>

                </td>
            </tr>
            </tbody>
        </table>
        <div th:replace="~{fragments/page :: page}">...</div>
    </div>
</div>

<script src="../../js/audit/equipmentRepairList.js" th:src="@{/js/audit/equipmentRepairList.js}"></script>
